This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 29, 2013, 11:01 AM
12 Posts
topic has been resolvedResolved

Java design element corruption

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: java design element,Bug
  • Replies: 2
I know this issue is around for some time. I guess since the introduction of Java design element. I've seen at least a couple of posts on this forum, Notes 8.5 forum as well as on stackoverflow, but I wonder if anybody has found a workaround. 
 
The problom occurs when you edit some unrelated design element; Java class suddenly stops loading with a message similar to one below:
Error while executing JavaScript action expression
Script interpreter error, line=5, col=48: Error while calling java constructor 'com.xxx.xpages.DriveInfo(number)' (java.lang.reflect.InvocationTargetException).
com.xxx.xpages.DriveInfo$Drive
  
Here it finds the the parent class and tries to execute constructor, but does not find the internal one. But it can be any class - internal or not. It might be an error like this:

Script interpreter error, line=5, col=48: [ReferenceError] 'com' not found

Here it does not find the main class. Not even the package that contains several other classes.

This problem appears both in client and on server, that is - the design really becomes corrupt and replication sends the corruption to server. The problem is not really the corruption of design element itself - the source code is fine - it's just the compiled class that seems to have vanished.

This does not happen every time, but often enough to be real bother, since any unrelated change forces you to re-test all xpages in all test scenarios that might try loading some classes.
  
I cannot find any other option as to "touch" the particular java design element using Designer in order to fix the issue. And then while trying to touch one class the other might break...

 "clean" or "build" do not help. On stackoverflow thread (http://stackoverflow.com/questions/13512961/xpages-java-corruption-issue) the "accepted" answer is about Extension library, but in my case I do not use extension library. The thing is just broken.

I've seen suggestions that the "old style" method of storing Java code in file system does not have this effect, but the "new" way somehow feels easier and it's a natural expectation that something this basic must work. And it would be really great if the classes could be shown in hierarchy instead of just a flat view (I know that I can access it from package explorer as well, but having at least an hierarchical option for the "Application" view could be even better.  

Any ideas about a "quick fix", "permanent fix" or a workaround?
 

Mar 29, 2013, 3:02 PM
366 Posts
Re: Java design element corruption
 The best work around is using the package explorer view that you already mentioned.

I think this issues is addressed in 8.5.3 FP3 though. 


 
Apr 3, 2013, 9:31 PM
12 Posts
Re: Java design element corruption
Thanks a lot Paul. I was not on FP3.

For some reason putting java classes elsewhere did not help, however since I upgraded the client I have not seen this problem.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal